define(['common-pagination'], function (CommonPagination) {
    new Vue({
        el: '#article-index',

        data: {
            paged: {},
            page: {}
        },

        components:{'pagination': CommonPagination},

        methods: {

            getArticles: function () {
                var vm = this;
                $.post('/article/getArticles', { page: this.page }).done(function (res) {
                    vm.paged = res.result;
                });
            }

        },

        created: function () {
            this.getArticles();
        }
    })
})